Objects of this class are usually created on the heap and used
in exception handling in the following way:
|
Public Types
|
enum |
Code {
codeOk, codeOutOfMemory, codeHardwareFailure,
codeOutOfVideoMemory,
codeUnspecified
} |
Public Member Functions
|
|
Error (const QString
&sMessage, Code eCode=codeUnspecified, const char *pFunction=0,
const char *pSourceFileName=0, unsigned int iLine=0) |
|
Constructor.
|
Error
* |
Format (const char
*pMessage,...) |
|
Sets the message in the error using
printf-like formatting. Returns a pointer to itself.
|
enum Code |
Code (void) const |
|
Returns the error code associated with the
error.
|
const QString & |
Message (void) const |
|
Returns the error message associated with
the error.
|
void |
Report (const QString
&sPre="") const |
|
Reports the error to the user in a message
box and deletes the Error object.
|
void |
Discard (void) const |
|
Discards the error message and deletes the
object (except s_cBadAlloc errors, which should never be deleted.).
|
Static Public Member Functions
|
void |
ThrowBadAlloc (void) |
|
Throws a static bad alloc exception. (No
memory allocation is required to report allocation problems.).
|
Public Attributes
|
enum mudbox::Error::Code |
m_eCode |
Static Public Attributes
|
Error |
s_cBadAlloc |
mudbox::Error mudbox::Error
mudbox::Error mudbox::Error mudbox::Error mudbox::Error
mudbox::Error mudbox::Error mudbox::Error mudbox::Error
mudbox::Error mudbox::Error
mudbox::Error mudbox::Error mudbox::Error mudbox::Error
mudbox::Error mudbox::Error mudbox::Error mudbox::Error